﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Gargoyle.Roton
{
    /// <summary>
    /// A representation of an ANSI character with both color and character values.
    /// </summary>
    public struct AnsiChar
    {
        /// <summary>
        /// Determines which glyph in the font to represent.
        /// </summary>
        public byte Character;

        /// <summary>
        /// Contains foreground (lower 4 bits) and background (upper 4 bits) color index.
        /// </summary>
        public byte Color;

        /// <summary>
        /// Create a new AnsiChar.
        /// </summary>
        /// <param name="newChar">Glyph index.</param>
        /// <param name="newColor">Color value.</param>
        public AnsiChar(byte newChar, byte newColor)
        {
            Character = newChar;
            Color = newColor;
        }
    }

}
